package com.huawei.appgallery.forum.forum.node;

import android.content.Context;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.huawei.appgallery.forum.base.card.ForumNode;
import com.huawei.appgallery.forum.forum.card.ForumListCardV2;
import o.bun.d;
import o.dok;

public class ForumListNodeV2 extends ForumNode {
    public ForumListNodeV2(Context context) {
        super(context);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LinearLayout linearLayout = (LinearLayout) LayoutInflater.from(this.ॱ).inflate(ˎ(), null);
        ˊ(ॱ(linearLayout));
        viewGroup.addView(linearLayout);
        return true;
    }

    private ForumListCardV2 ॱ(View view) {
        ForumListCardV2 forumListCardV2 = new ForumListCardV2(this.ॱ);
        forumListCardV2.ˏ(view);
        return forumListCardV2;
    }

    public int ˎ() {
        if (ˋ()) {
            return d.ˊॱ;
        }
        return d.ˋॱ;
    }

    private boolean ˋ() {
        DisplayMetrics ˏ = dok.ˏ(this.ॱ);
        return ((int) (((float) ˏ.widthPixels) / ˏ.density)) > 600;
    }
}
